﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <link rel="stylesheet" href="../../Styles/jqx.apireference.css" type="text/css" />
    <script type="text/javascript" src="../../scripts/jquery-1.9.0.min.js"></script>
    <meta name="keywords" content="jQuery, Draggable, Draggable Plugin, jqxDragDrop" />
    <meta name="description" content="This page represents the help documentation of the jqxDragDrop plugin." />
    <title>jqxDragDrop API Reference</title>
    <script type="text/javascript">
        $(document).ready(function () {
           $(".documentation-option-type-click").click(function (event) {
                $(event.target).parents('tr').next().find(".property-content").toggle();
            });
        });
    </script>
</head>
<body>
    <div id="properties">
        <h2 class="documentation-top-header">
            Properties</h2>
        <table class="documentation-table">
            <tr>
                <th>
                    Name
                </th>
                <th>
                    Type
                </th>
                <th>
                    Default
                </th>
            </tr>
            <tr>
                <td class="documentation-option-type-click">
                    <span id='property-name-disabled'>restricter</span>
                </td>
                <td>
                    <span>Object/String</span>
                </td>
                <td>
                    'document'
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>
                           Sets or gets dragdrop's restrict area. Possible values are 'body', 'document', 'parent', [top, left, width, height], { top: y, left: x, width: w, height: h }</p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Initialize a jqxDragDrop with the <code>restricter</code> property specified.
                        </p>
                        <pre><code>$('#jqxDragDrop').jqxDragDrop({restricter:'body'});</code></pre>
                    </div>
                </td>
            </tr>
            
             <tr>
                <td class="documentation-option-type-click">
                    <span id='Span1'>disabled</span>
                </td>
                <td>
                    <span>Boolean</span>
                </td>
                <td>
                    false
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>
                          Sets or gets whether the dragging is disabled.</p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Initialize a jqxDragDrop with the <code>disabled</code> property specified.
                        </p>
                        <pre><code>$('#jqxDragDrop').jqxDragDrop({disabled:true});</code></pre>
                    </div>
                </td>
            </tr>

            <tr>
                <td class="documentation-option-type-click">
                    <span id='Span2'>feedback</span>
                </td>
                <td>
                    <span>String</span>
                </td>
                <td>
                    'clone'
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>
                          Gets or sets the feedback. The feedback is the object which is actually dragged by the user. Possible values are: 'clone', 'original'.
                          When the value is 'original', the user drags the original element, otherwise the user drags a clone of the original element.
                          </p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Initialize a jqxDragDrop with the <code>feedback</code> property specified.
                        </p>
                        <pre><code>$('#jqxDragDrop').jqxDragDrop({feedback:'original'});</code></pre>
                    </div>
                </td>
            </tr>


            <tr>
                <td class="documentation-option-type-click">
                    <span id='Span3'>opacity</span>
                </td>
                <td>
                    <span>Number</span>
                </td>
                <td>
                    0.6
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>
                          Gets or sets draggable object's opacity when it's dragging.</p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Initialize a jqxDragDrop with the <code>opacity</code> property specified.
                        </p>
                        <pre><code>$('#jqxDragDrop').jqxDragDrop({opacity:0.3});</code></pre>
                    </div>
                </td>
            </tr>

            <tr>
                <td class="documentation-option-type-click">
                    <span id='Span4'>revert</span>
                </td>
                <td>
                    <span>Boolean</span>
                </td>
                <td>
                    false
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>
                          Gets or sets whether the draggable element will be reverted to it's original position after drop.</p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Initialize a jqxDragDrop with the <code>revert</code> property specified.
                        </p>
                        <pre><code>$('#jqxDragDrop').jqxDragDrop({revert:true});</code></pre>
                    </div>
                </td>
            </tr>

             <tr>
                <td class="documentation-option-type-click">
                    <span id='Span5'>revertDuration</span>
                </td>
                <td>
                    <span>Number</span>
                </td>
                <td>
                    400
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>
                          Sets or gets the duration for which the draggable object will be reverted.</p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Initialize a jqxDragDrop with the <code>revertDuration</code> property specified.
                        </p>
                        <pre><code>$('#jqxDragDrop').jqxDragDrop({revertDuration:300});</code></pre>
                    </div>
                </td>
            </tr>


             <tr>
                <td class="documentation-option-type-click">
                    <span id='Span6'>distance</span>
                </td>
                <td>
                    <span>Number</span>
                </td>
                <td>
                    5
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>
                          Gets or sets the distance required for the cursor to pass befor the drag begins.</p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Initialize a jqxDragDrop with the <code>distance</code> property specified.
                        </p>
                        <pre><code>$('#jqxDragDrop').jqxDragDrop({distance:10});</code></pre>
                    </div>
                </td>
            </tr>

             <tr>
                <td class="documentation-option-type-click">
                    <span id='Span8'>tolerance</span>
                </td>
                <td>
                    <span>String</span>
                </td>
                <td>
                    'intersect'. Possible values: 'intersect' and 'fit'.
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>
                          Gets or sets whether the draggable item is over it's drop target when it's intersecting it or when it's fully inside it's target.</p>
                          The onDropTargetEnter event will be triggered depending on the value of this property. The 'fit' tolerance means that the draggable item is fully inside
                          the target, where the 'intersect' means that the item is intersecting with the target.
                        <h4>
                            Code examples</h4>
                        <p>
                            Initialize a jqxDragDrop with the <code>tolerance</code> property specified.
                        </p>
                        <pre><code>$('#jqxDragDrop').jqxDragDrop({tolerance:'fit'});</code></pre>
                    </div>
                </td>
            </tr>

            <tr>
                <td class="documentation-option-type-click">
                    <span id='Span9'>data</span>
                </td>
                <td>
                    <span>Object</span>
                </td>
                <td>
                    null
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>
                          This property can be used for setting some kind of information transferred with the draggable.</p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Initialize a jqxDragDrop with the <code>data</code> property specified.
                        </p>
                        <pre><code>$('#jqxDragDrop').jqxDragDrop({data: {foo: 'foo', bar: 'bar'}});</code></pre>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="documentation-option-type-click">
                    <span id='Span12'>dropAction</span>
                </td>
                <td>
                    <span>String</span>
                </td>
                <td>
                    'default'. Possible values: 'default' and 'none'.
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>
                          Sets or gets whether the draggable element will change its position ('default') or not ('none') when the element is dropped.
                          
                          </p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Initialize a jqxDragDrop with the <code>dropAction</code> property specified.
                        </p>
                        <pre><code>$('#jqxDragDrop').jqxDragDrop({ dropAction: 'none' });</code></pre>
                    </div>
                </td>
            </tr>
           <tr>
                <td class="documentation-option-type-click">
                    <span id='Span23'>dropTarget</span>
                </td>
                <td>
                    <span>String/Object</span>
                </td>
                <td>
                    null.
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>
 Sets or gets the drop target.
The drop target is a DOM element(s) for which jqxDragDrop triggers events when the user drags or drops
the draggable element over that element(s). The drop target can be specified by using a selector or an 
object. If the user drags the draggable element over the drop target, the onDropTargetEnter event will be raised.
If the draggable element is inside the drop target and the user drags the element outside the drop target, the onDropTargetLeave event is raised.
When the user drops the draggable element over a drop target, the onTargetDrop event is raised.                         
                          </p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Initialize a jqxDragDrop with the <code>dropTarget</code> property specified.
                       </p>
                        <pre><code>$('#jqxDragDrop').jqxDragDrop( { dropTarget: $(document.body) } );</code></pre>
                      <p>
                            Specifying the drop target with CSS selector:
                       </p>
                        <pre><code>$('#jqxDragDrop').jqxDragDrop( { dropTarget: $('.dropTarget') } );</code></pre>
                        <p>
                        The above code will make all elements which use the "dropTarget" CSS class to be drop targets for the draggable element.
                        </p>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="documentation-option-type-click">
                    <span id='Span13'>dragZIndex</span>
                </td>
                <td>
                    <span>Number</span>
                </td>
                <td>
                    99999
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>
                          Sets or gets element's z-index when it's dragging.</p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Initialize a jqxDragDrop with the <code>dragZIndex</code> property specified.
                        </p>
                        <pre><code>$('#jqxDragDrop').jqxDragDrop({ dragZIndex: 6 });</code></pre>
                    </div>
                </td>
            </tr>

            <tr>
                <td class="documentation-option-type-click">
                    <span id='Span14'>appendTo</span>
                </td>
                <td>
                    <span>String</span>
                </td>
                <td>
                    'parent'
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>
                          Sets or gets where will be appended the draggable's feedback.</p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Initialize a jqxDragDrop with the <code>appendTo</code> property specified.
                        </p>
                        <pre><code>$('#jqxDragDrop').jqxDragDrop({ appendTo: 'body' });</code></pre>
                    </div>
                </td>
            </tr>

            <tr>
                <td class="documentation-option-type-click">
                    <span id='Span15'>onDragEnd</span>
                </td>
                <td>
                    <span>Function</span>
                </td>
                <td>
                    null
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>
                          Callback which is executing when the drag ends.</p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Initialize a jqxDragDrop with the <code>onDragEnd</code> property specified.
                        </p>
                        <pre><code>$('#jqxDragDrop').jqxDragDrop({ onDragEnd: function() { alert('Bar'); } });</code></pre>
                    </div>
                </td>
            </tr>

            <tr>
                <td class="documentation-option-type-click">
                    <span id='Span16'>onDrag</span>
                </td>
                <td>
                    <span>Function</span>
                </td>
                <td>
                    null
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>
                          Callback which is executing while dragging.</p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Initialize a jqxDragDrop with the <code>onDrag</code> property specified.
                        </p>
                        <pre><code>$('#jqxDragDrop').jqxDragDrop({ onDrag: function(data, pos) { alert(pos.x); } });</code></pre>
                    </div>
                </td>
            </tr>

            <tr>
                <td class="documentation-option-type-click">
                    <span id='Span17'>onDragStart</span>
                </td>
                <td>
                    <span>Function</span>
                </td>
                <td>
                    null
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>
                          Callback which is executing when drag start.</p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Initialize a jqxDragDrop with the <code>onDragStart</code> property specified.
                        </p>
                        <pre><code>$('#jqxDragDrop').jqxDragDrop({ onDragStart: function(pos) { alert(pos.x); } });</code></pre>
                    </div>
                </td>
            </tr>

            <tr>
                <td class="documentation-option-type-click">
                    <span id='Span18'>onTargetDrop</span>
                </td>
                <td>
                    <span>Function</span>
                </td>
                <td>
                    null
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>
                          Callback which is executing when drag ends over the drop target.</p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Initialize a jqxDragDrop with the <code>onTargetDrop</code> property specified.
                        </p>
                        <pre><code>$('#jqxDragDrop').jqxDragDrop({ onTargetDrop: function(data) { alert('Bar'); } });</code></pre>
                    </div>
                </td>
            </tr>

            <tr>
                <td class="documentation-option-type-click">
                    <span id='Span19'>onDropTargetEnter</span>
                </td>
                <td>
                    <span>Function</span>
                </td>
                <td>
                    null
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>
                          Callback which is executing when the draggable enter any of it's drop targets.</p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Initialize a jqxDragDrop with the <code>onDropTargetEnter</code> property specified.
                        </p>
                        <pre><code>$('#jqxDragDrop').jqxDragDrop({ onDropTargetEnter: function() { alert('Bar'); } });</code></pre>
                    </div>
                </td>
            </tr>

            <tr>
                <td class="documentation-option-type-click">
                    <span id='Span20'>onDropTargetLeave</span>
                </td>
                <td>
                    <span>Function</span>
                </td>
                <td>
                    null
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>
                          Callback which is executing when the draggable leave any of it's drop targets.</p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Initialize a jqxDragDrop with the <code>onDropTargetLeave</code> property specified.
                        </p>
                        <pre><code>$('#jqxDragDrop').jqxDragDrop({ onDropTargetLeave: function(data) { alert(data); } });</code></pre>
                    </div>
                </td>
            </tr>

            <tr>
                <td class="documentation-option-type-click">
                    <span id='Span21'>initFeedback</span>
                </td>
                <td>
                    <span>Function</span>
                </td>
                <td>
                    null
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>
                          Callback which is executing when the feedback is created.</p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Initialize a jqxDragDrop with the <code>onDropTargetLeave</code> property specified.
                        </p>
                        <pre><code>$('#jqxDragDrop').jqxDragDrop({ onDropTargetLeave: function(feedback) { feedback.width(300); } });</code></pre>
                    </div>
                </td>
            </tr>


            <tr>
                <td colspan='3' style='width: 100%'>
                    <h2 class="documentation-top-header">
                        Events</h2>
                </td>
            </tr>
            <tr>
                <td class="documentation-option-type-click">
                    <span id='Span27'>dragStart</span>
                </td>
                <td>
                    <span>Event</span>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>The dragStart event is triggered when the item is dragged for first time.
                        </p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Bind to the dragStart event by type: jqxDragDrop.
                        </p>
                        <pre><code>$('#jqxDragDrop').on('dragStart', function () { // Some code here. }); </code></pre>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="documentation-option-type-click">
                    <span id='Span7'>dragEnd</span>
                </td>
                <td>
                    <span>Event</span>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>The dragEnd event is triggered when the item is dropped.
                        </p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Bind to the dragEnd event by type: jqxDragDrop.
                        </p>
                        <pre><code>$('#jqxDragDrop').on('dragEnd', function () { // Some code here. }); </code></pre>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="documentation-option-type-click">
                    <span id='Span10'>dragging</span>
                </td>
                <td>
                    <span>Event</span>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>The dragging event is triggered while the item is dragging.
                        </p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Bind to the dragging event by type: jqxDragDrop.
                        </p>
                        <pre><code>$('#jqxDragDrop').on('dragging', function () { // Some code here. }); </code></pre>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="documentation-option-type-click">
                    <span id='Span11'>dropTargetEnter</span>
                </td>
                <td>
                    <span>Event</span>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>The dropTargetEnter event is triggered when the draggable item is over it's drop target for first time.
                        </p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Bind to the dropTargetEnter event by type: jqxDragDrop.
                        </p>
                        <pre><code>$('#jqxDragDrop').on('dropTargetEnter', function () { // Some code here. }); </code></pre>
                    </div>
                </td>
            </tr>
            <tr>
                <td class="documentation-option-type-click">
                    <span id='Span22'>dropTargetLeave</span>
                </td>
                <td>
                    <span>Event</span>
                </td>
                <td>
                </td>
            </tr>
            <tr>
                <td colspan='3' style='width: 100%'>
                    <div class="documentation-option-description property-content" style="display: none;">
                        <p>The dropTargetLeave event is triggered when the draggable item leave it's drop target.
                        </p>
                        <h4>
                            Code examples</h4>
                        <p>
                            Bind to the dropTargetEnter event by type: jqxDragDrop.
                        </p>
                        <pre><code>$('#dropTargetLeave').on('dropTargetLeave', function () { // Some code here. }); </code></pre>
                    </div>
                </td>
            </tr>  
        </table>
        <br />
    </div>
</body>
</html>
